package com.fwlst.module_home.screen

import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.alibaba.android.arouter.launcher.ARouter

@Composable
fun HomeScreen() {
    Column(
        modifier = Modifier.fillMaxWidth().padding(16.dp)
    ) {
        Row {
            Button(
                onClick = {
                    println("跳转到视频模板1")
                    ARouter.getInstance()
                        .build("/moduleResource/route/VideoTemp1Activity")
                        .navigation()
                },
                modifier = Modifier
                    .fillMaxWidth()
                    .height(50.dp)
                    .weight(1f)
            ) {
                Text(text = "视频模板1", fontSize = 16.sp)
            }
            Spacer(modifier = Modifier.width(16.dp))
            Button(
                onClick = {
                    ARouter.getInstance()
                        .build("/moduleSmallTools/route/SmallToolsRulerActivity")
                        .navigation()
                },
                modifier = Modifier
                    .fillMaxWidth()
                    .height(50.dp)
                    .weight(1f)
            ) {
                Text(text = "尺子测量", fontSize = 16.sp)
            }
        }
        Spacer(modifier = Modifier.height(16.dp))
        Row {
            Button(
                onClick = {
                    ARouter.getInstance()
                        .build("/moduleSmallTools/route/SmallToolsNoisePhotoActivity")
                        .navigation()
                },
                modifier = Modifier
                    .fillMaxWidth()
                    .height(50.dp)
                    .weight(1f)
            ) {
                Text(text = "照片噪音监测", fontSize = 16.sp)
            }
            Spacer(modifier = Modifier.width(16.dp))
            Button(
                onClick = {
                    ARouter.getInstance()
                        .build("/moduleSmallTools/route/SmallToolsNoiseVideoActivity")
                        .navigation()
                },
                modifier = Modifier
                    .fillMaxWidth()
                    .height(50.dp)
                    .weight(1f)
            ) {
                Text(text = "视频噪音监测", fontSize = 16.sp)
            }
        }
    }
}